.class public Llecho/lib/hellocharts/renderer/AxesRenderer;
.super Ljava/lang/Object;


# static fields
.field private static final BOTTOM:I = 0x3

.field private static final DEFAULT_AXIS_MARGIN_DP:I = 0x2

.field private static final LEFT:I = 0x1

.field private static final RIGHT:I = 0x2

.field private static final TOP:I

.field private static final labelWidthChars:[C


# instance fields
.field private autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

.field private autoValuesToDrawTab:[[F

.field private axisMargin:I

.field private chart:Llecho/lib/hellocharts/view/Chart;

.field private computator:Llecho/lib/hellocharts/computator/ChartComputator;

.field private density:F

.field private fontMetricsTab:[Landroid/graphics/Paint$FontMetricsInt;

.field private labelBaselineTab:[F

.field private labelBuffer:[C

.field private labelDimensionForMarginsTab:[I

.field private labelDimensionForStepsTab:[I

.field private labelPaintTab:[Landroid/graphics/Paint;

.field private labelTextAscentTab:[I

.field private labelTextDescentTab:[I

.field private labelWidthTab:[I

.field private linePaintTab:[Landroid/graphics/Paint;

.field private linesDrawBufferTab:[[F

.field private nameBaselineTab:[F

.field private namePaintTab:[Landroid/graphics/Paint;

.field private rawValuesTab:[[F

.field private scaledDensity:F

.field private separationLineTab:[F

.field private tiltedLabelXTranslation:[I

.field private tiltedLabelYTranslation:[I

.field private valuesToDrawNumTab:[I

.field private valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/16 v0, 0x40

    new-array v0, v0, [C

    fill-array-data v0, :array_0

    sput-object v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthChars:[C

    return-void

    :array_0
    .array-data 2
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
        0x30s
    .end array-data
.end method

.method public constructor <init>(Landroid/content/Context;Llecho/lib/hellocharts/view/Chart;)V
    .locals 7

    const/4 v6, 0x3

    const/4 v5, 0x2

    const/4 v4, 0x1

    const/4 v1, 0x0

    const/4 v3, 0x4

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-array v0, v3, [Landroid/graphics/Paint;

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v1

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v4

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v5

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v6

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    new-array v0, v3, [Landroid/graphics/Paint;

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v1

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v4

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v5

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v6

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    new-array v0, v3, [Landroid/graphics/Paint;

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v1

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v4

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v5

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    aput-object v2, v0, v6

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linePaintTab:[Landroid/graphics/Paint;

    new-array v0, v3, [F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    new-array v0, v3, [F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    new-array v0, v3, [F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelXTranslation:[I

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelYTranslation:[I

    new-array v0, v3, [Landroid/graphics/Paint$FontMetricsInt;

    new-instance v2, Landroid/graphics/Paint$FontMetricsInt;

    invoke-direct {v2}, Landroid/graphics/Paint$FontMetricsInt;-><init>()V

    aput-object v2, v0, v1

    new-instance v2, Landroid/graphics/Paint$FontMetricsInt;

    invoke-direct {v2}, Landroid/graphics/Paint$FontMetricsInt;-><init>()V

    aput-object v2, v0, v4

    new-instance v2, Landroid/graphics/Paint$FontMetricsInt;

    invoke-direct {v2}, Landroid/graphics/Paint$FontMetricsInt;-><init>()V

    aput-object v2, v0, v5

    new-instance v2, Landroid/graphics/Paint$FontMetricsInt;

    invoke-direct {v2}, Landroid/graphics/Paint$FontMetricsInt;-><init>()V

    aput-object v2, v0, v6

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->fontMetricsTab:[Landroid/graphics/Paint$FontMetricsInt;

    const/16 v0, 0x40

    new-array v0, v0, [C

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    new-array v0, v3, [I

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawNumTab:[I

    filled-new-array {v3, v1}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Float;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    filled-new-array {v3, v1}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Float;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesToDrawTab:[[F

    filled-new-array {v3, v1}, [I

    move-result-object v0

    const-class v2, Llecho/lib/hellocharts/model/AxisValue;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[Llecho/lib/hellocharts/model/AxisValue;

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;

    filled-new-array {v3, v1}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Float;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[F

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    new-array v0, v3, [Llecho/lib/hellocharts/util/AxisAutoValues;

    new-instance v2, Llecho/lib/hellocharts/util/AxisAutoValues;

    invoke-direct {v2}, Llecho/lib/hellocharts/util/AxisAutoValues;-><init>()V

    aput-object v2, v0, v1

    new-instance v2, Llecho/lib/hellocharts/util/AxisAutoValues;

    invoke-direct {v2}, Llecho/lib/hellocharts/util/AxisAutoValues;-><init>()V

    aput-object v2, v0, v4

    new-instance v2, Llecho/lib/hellocharts/util/AxisAutoValues;

    invoke-direct {v2}, Llecho/lib/hellocharts/util/AxisAutoValues;-><init>()V

    aput-object v2, v0, v5

    new-instance v2, Llecho/lib/hellocharts/util/AxisAutoValues;

    invoke-direct {v2}, Llecho/lib/hellocharts/util/AxisAutoValues;-><init>()V

    aput-object v2, v0, v6

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    iput-object p2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {p2}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->density:F

    iput v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->density:F

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->scaledDensity:F

    iput v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->scaledDensity:F

    iget v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->density:F

    invoke-static {v0, v5}, Llecho/lib/hellocharts/util/ChartUtils;->dp2px(FI)I

    move-result v0

    iput v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    move v0, v1

    :goto_0
    if-ge v0, v3, :cond_0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    invoke-virtual {v1, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    invoke-virtual {v1, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linePaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    sget-object v2, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linePaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, v0

    invoke-virtual {v1, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private checkRawValue(Landroid/graphics/Rect;FZIZ)Z
    .locals 5

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-eqz p3, :cond_0

    if-eqz p5, :cond_2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    const/4 v3, 0x3

    aget v2, v2, v3

    iget v3, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v2, v3

    int-to-float v2, v2

    iget-object v3, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v3, v3, v1

    iget v4, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v3, v4

    int-to-float v3, v3

    iget v4, p1, Landroid/graphics/Rect;->bottom:I

    int-to-float v4, v4

    sub-float v2, v4, v2

    cmpg-float v2, p2, v2

    if-gtz v2, :cond_1

    iget v2, p1, Landroid/graphics/Rect;->top:I

    int-to-float v2, v2

    add-float/2addr v2, v3

    cmpl-float v2, p2, v2

    if-ltz v2, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    move v0, v1

    goto :goto_0

    :cond_2
    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    aget v2, v2, p4

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    iget v3, p1, Landroid/graphics/Rect;->left:I

    int-to-float v3, v3

    add-float/2addr v3, v2

    cmpl-float v3, p2, v3

    if-ltz v3, :cond_3

    iget v3, p1, Landroid/graphics/Rect;->right:I

    int-to-float v3, v3

    sub-float v2, v3, v2

    cmpg-float v2, p2, v2

    if-lez v2, :cond_0

    :cond_3
    move v0, v1

    goto :goto_0
.end method

.method private drawAxisLabelsAndName(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V
    .locals 10

    const/4 v0, 0x0

    invoke-direct {p0, p3}, Llecho/lib/hellocharts/renderer/AxesRenderer;->isAxisVertical(I)Z

    move-result v8

    const/4 v1, 0x1

    if-eq v1, p3, :cond_0

    const/4 v1, 0x2

    if-ne v1, p3, :cond_1

    :cond_0
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p3

    :goto_0
    const/4 v2, 0x0

    move v7, v2

    :goto_1
    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawNumTab:[I

    aget v2, v2, p3

    if-ge v7, v2, :cond_6

    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->isAutoGenerated()Z

    move-result v2

    if-eqz v2, :cond_3

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesToDrawTab:[[F

    aget-object v2, v2, p3

    aget v2, v2, v7

    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->getFormatter()Llecho/lib/hellocharts/formatter/AxisValueFormatter;

    move-result-object v3

    iget-object v4, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    iget-object v5, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v5, v5, p3

    iget v5, v5, Llecho/lib/hellocharts/util/AxisAutoValues;->decimals:I

    invoke-interface {v3, v4, v2, v5}, Llecho/lib/hellocharts/formatter/AxisValueFormatter;->formatValueForAutoGeneratedAxis([CFI)I

    move-result v3

    :goto_2
    if-eqz v8, :cond_4

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v0, v0, p3

    aget v5, v0, v7

    move v4, v1

    :goto_3
    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->hasTiltedLabels()Z

    move-result v0

    if-eqz v0, :cond_5

    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelXTranslation:[I

    aget v0, v0, p3

    int-to-float v0, v0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelYTranslation:[I

    aget v1, v1, p3

    int-to-float v1, v1

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->translate(FF)V

    const/high16 v0, -0x3dcc0000    # -45.0f

    invoke-virtual {p1, v0, v4, v5}, Landroid/graphics/Canvas;->rotate(FFF)V

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    array-length v0, v0

    sub-int v2, v0, v3

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v6, v0, p3

    move-object v0, p1

    invoke-virtual/range {v0 .. v6}, Landroid/graphics/Canvas;->drawText([CIIFFLandroid/graphics/Paint;)V

    invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V

    :goto_4
    add-int/lit8 v0, v7, 0x1

    move v7, v0

    move v1, v4

    move v0, v5

    goto :goto_1

    :cond_1
    if-eqz p3, :cond_2

    const/4 v1, 0x3

    if-ne v1, p3, :cond_9

    :cond_2
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p3

    move v9, v1

    move v1, v0

    move v0, v9

    goto :goto_0

    :cond_3
    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;

    aget-object v2, v2, p3

    aget-object v2, v2, v7

    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->getFormatter()Llecho/lib/hellocharts/formatter/AxisValueFormatter;

    move-result-object v3

    iget-object v4, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    invoke-interface {v3, v4, v2}, Llecho/lib/hellocharts/formatter/AxisValueFormatter;->formatValueForManualAxis([CLlecho/lib/hellocharts/model/AxisValue;)I

    move-result v3

    goto :goto_2

    :cond_4
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v1, v1, p3

    aget v4, v1, v7

    move v5, v0

    goto :goto_3

    :cond_5
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBuffer:[C

    array-length v0, v0

    sub-int v2, v0, v3

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v6, v0, p3

    move-object v0, p1

    invoke-virtual/range {v0 .. v6}, Landroid/graphics/Canvas;->drawText([CIIFFLandroid/graphics/Paint;)V

    goto :goto_4

    :cond_6
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v0

    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_7

    if-eqz v8, :cond_8

    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    const/high16 v1, -0x3d4c0000    # -90.0f

    invoke-virtual {v0}, Landroid/graphics/Rect;->centerY()I

    move-result v2

    int-to-float v2, v2

    invoke-virtual {v0}, Landroid/graphics/Rect;->centerY()I

    move-result v3

    int-to-float v3, v3

    invoke-virtual {p1, v1, v2, v3}, Landroid/graphics/Canvas;->rotate(FFF)V

    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0}, Landroid/graphics/Rect;->centerY()I

    move-result v0

    int-to-float v0, v0

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    aget v2, v2, p3

    iget-object v3, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v3, v3, p3

    invoke-virtual {p1, v1, v0, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V

    :cond_7
    :goto_5
    return-void

    :cond_8
    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0}, Landroid/graphics/Rect;->centerX()I

    move-result v0

    int-to-float v0, v0

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    aget v2, v2, p3

    iget-object v3, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v3, v3, p3

    invoke-virtual {p1, v1, v0, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    goto :goto_5

    :cond_9
    move v1, v0

    goto/16 :goto_0
.end method

.method private drawAxisLines(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V
    .locals 12

    const/4 v10, 0x0

    const/4 v0, 0x0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    invoke-direct {p0, p3}, Llecho/lib/hellocharts/renderer/AxesRenderer;->isAxisVertical(I)Z

    move-result v11

    const/4 v2, 0x1

    if-eq v2, p3, :cond_0

    const/4 v2, 0x2

    if-ne v2, p3, :cond_2

    :cond_0
    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    aget v3, v2, p3

    iget v2, v1, Landroid/graphics/Rect;->bottom:I

    int-to-float v5, v2

    iget v2, v1, Landroid/graphics/Rect;->top:I

    int-to-float v4, v2

    iget v2, v1, Landroid/graphics/Rect;->left:I

    int-to-float v2, v2

    iget v1, v1, Landroid/graphics/Rect;->right:I

    int-to-float v1, v1

    move v6, v0

    move v7, v1

    move v8, v0

    move v9, v2

    move v2, v5

    move v1, v3

    :goto_0
    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->hasSeparationLine()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v5, v0, p3

    move-object v0, p1

    invoke-virtual/range {v0 .. v5}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    :cond_1
    invoke-virtual {p2}, Llecho/lib/hellocharts/model/Axis;->hasLines()Z

    move-result v0

    if-eqz v0, :cond_6

    move v0, v10

    :goto_1
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawNumTab:[I

    aget v1, v1, p3

    if-ge v0, v1, :cond_5

    if-eqz v11, :cond_4

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v1, v1, p3

    aget v6, v1, v0

    move v8, v6

    :goto_2
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v1, v1, p3

    mul-int/lit8 v2, v0, 0x4

    add-int/lit8 v2, v2, 0x0

    aput v9, v1, v2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v1, v1, p3

    mul-int/lit8 v2, v0, 0x4

    add-int/lit8 v2, v2, 0x1

    aput v8, v1, v2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v1, v1, p3

    mul-int/lit8 v2, v0, 0x4

    add-int/lit8 v2, v2, 0x2

    aput v7, v1, v2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v1, v1, p3

    mul-int/lit8 v2, v0, 0x4

    add-int/lit8 v2, v2, 0x3

    aput v6, v1, v2

    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_2
    if-eqz p3, :cond_3

    const/4 v2, 0x3

    if-ne v2, p3, :cond_7

    :cond_3
    iget v2, v1, Landroid/graphics/Rect;->left:I

    int-to-float v5, v2

    iget v2, v1, Landroid/graphics/Rect;->right:I

    int-to-float v3, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    aget v4, v2, p3

    iget v2, v1, Landroid/graphics/Rect;->top:I

    int-to-float v2, v2

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    int-to-float v1, v1

    move v6, v1

    move v7, v0

    move v8, v2

    move v9, v0

    move v2, v4

    move v1, v5

    goto :goto_0

    :cond_4
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v1, v1, p3

    aget v7, v1, v0

    move v9, v7

    goto :goto_2

    :cond_5
    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v1, v1, p3

    mul-int/lit8 v0, v0, 0x4

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linePaintTab:[Landroid/graphics/Paint;

    aget-object v2, v2, p3

    invoke-virtual {p1, v1, v10, v0, v2}, Landroid/graphics/Canvas;->drawLines([FIILandroid/graphics/Paint;)V

    :cond_6
    return-void

    :cond_7
    move v6, v0

    move v7, v0

    move v8, v0

    move v9, v0

    move v4, v0

    move v3, v0

    move v2, v0

    move v1, v0

    goto/16 :goto_0
.end method

.method private getAxisNameMargin(Llecho/lib/hellocharts/model/Axis;I)I
    .locals 2

    const/4 v0, 0x0

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v1, v1, p2

    add-int/2addr v0, v1

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v1, v1, p2

    add-int/2addr v0, v1

    iget v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v0, v1

    :cond_0
    return v0
.end method

.method private initAxis(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 0

    if-nez p1, :cond_0

    :goto_0
    return-void

    :cond_0
    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisAttributes(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisMargin(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisMeasurements(Llecho/lib/hellocharts/model/Axis;I)V

    goto :goto_0
.end method

.method private initAxisAttributes(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 1

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisPaints(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisTextAlignment(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->hasTiltedLabels()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-direct {p0, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisDimensionForTiltedLabels(I)V

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->intiTiltedLabelsTranslation(Llecho/lib/hellocharts/model/Axis;I)V

    :goto_0
    return-void

    :cond_0
    invoke-direct {p0, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxisDimension(I)V

    goto :goto_0
.end method

.method private initAxisDimension(I)V
    .locals 3

    const/4 v0, 0x1

    if-eq v0, p1, :cond_0

    const/4 v0, 0x2

    if-ne v0, p1, :cond_2

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    aget v1, v1, p1

    aput v1, v0, p1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v1, v1, p1

    aput v1, v0, p1

    :cond_1
    :goto_0
    return-void

    :cond_2
    if-eqz p1, :cond_3

    const/4 v0, 0x3

    if-ne v0, p1, :cond_1

    :cond_3
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v1, v1, p1

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p1

    add-int/2addr v1, v2

    aput v1, v0, p1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    aget v1, v1, p1

    aput v1, v0, p1

    goto :goto_0
.end method

.method private initAxisDimensionForTiltedLabels(I)V
    .locals 6

    const-wide/high16 v4, 0x4000000000000000L    # 2.0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    aget v0, v0, p1

    int-to-double v0, v0

    invoke-static {v0, v1, v4, v5}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v0

    div-double/2addr v0, v4

    invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v0

    double-to-int v0, v0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v1, v1, p1

    int-to-double v2, v1

    invoke-static {v2, v3, v4, v5}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v2

    div-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    double-to-int v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    add-int/2addr v0, v1

    aput v0, v2, p1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v1, v1, p1

    int-to-float v1, v1

    const/high16 v2, 0x3f400000    # 0.75f

    mul-float/2addr v1, v2

    invoke-static {v1}, Ljava/lang/Math;->round(F)I

    move-result v1

    aput v1, v0, p1

    return-void
.end method

.method private initAxisMargin(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 3

    const/4 v0, 0x0

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v1

    if-nez v1, :cond_1

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isAutoGenerated()Z

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_1

    :cond_0
    iget v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v2, v2, p2

    add-int/2addr v1, v2

    add-int/2addr v0, v1

    :cond_1
    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->getAxisNameMargin(Llecho/lib/hellocharts/model/Axis;I)I

    move-result v1

    add-int/2addr v0, v1

    invoke-direct {p0, v0, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->insetContentRectWithAxesMargins(II)V

    return-void
.end method

.method private initAxisMeasurements(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 3

    const/4 v0, 0x1

    if-ne v0, p2, :cond_1

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->left:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->left:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    :goto_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->left:I

    int-to-float v1, v1

    aput v1, v0, p2

    :goto_1
    return-void

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->left:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p2

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    int-to-float v2, v2

    sub-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    aput v1, v0, p2

    goto :goto_0

    :cond_1
    const/4 v0, 0x2

    if-ne v0, p2, :cond_3

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->right:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->right:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    :goto_2
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->right:I

    int-to-float v1, v1

    aput v1, v0, p2

    goto :goto_1

    :cond_2
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->right:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p2

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    int-to-float v2, v2

    add-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    add-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    add-float/2addr v1, v2

    aput v1, v0, p2

    goto :goto_2

    :cond_3
    const/4 v0, 0x3

    if-ne v0, p2, :cond_5

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    :goto_3
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    int-to-float v1, v1

    aput v1, v0, p2

    goto/16 :goto_1

    :cond_4
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p2

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    int-to-float v2, v2

    add-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    add-float/2addr v1, v2

    aput v1, v0, p2

    goto :goto_3

    :cond_5
    if-nez p2, :cond_7

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_6

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->top:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    add-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->top:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    :goto_4
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->separationLineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->top:I

    int-to-float v1, v1

    aput v1, v0, p2

    goto/16 :goto_1

    :cond_6
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAxesMargins()Landroid/graphics/Rect;

    move-result-object v1

    iget v1, v1, Landroid/graphics/Rect;->top:I

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    sub-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    int-to-float v1, v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->nameBaselineTab:[F

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelBaselineTab:[F

    aget v1, v1, p2

    iget v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->axisMargin:I

    int-to-float v2, v2

    sub-float/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForMarginsTab:[I

    aget v2, v2, p2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    aput v1, v0, p2

    goto :goto_4

    :cond_7
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "Invalid axis position: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method private initAxisPaints(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 5

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getTypeface()Landroid/graphics/Typeface;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, p2

    invoke-virtual {v1, v0}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, p2

    invoke-virtual {v1, v0}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getTextColor()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    iget v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->scaledDensity:F

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getTextSize()I

    move-result v2

    invoke-static {v1, v2}, Llecho/lib/hellocharts/util/ChartUtils;->sp2px(FI)I

    move-result v1

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->fontMetricsTab:[Landroid/graphics/Paint$FontMetricsInt;

    aget-object v1, v1, p2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->getFontMetricsInt(Landroid/graphics/Paint$FontMetricsInt;)I

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getTextColor()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    iget v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->scaledDensity:F

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getTextSize()I

    move-result v2

    invoke-static {v1, v2}, Llecho/lib/hellocharts/util/ChartUtils;->sp2px(FI)I

    move-result v1

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linePaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getLineColor()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->fontMetricsTab:[Landroid/graphics/Paint$FontMetricsInt;

    aget-object v1, v1, p2

    iget v1, v1, Landroid/graphics/Paint$FontMetricsInt;->ascent:I

    invoke-static {v1}, Ljava/lang/Math;->abs(I)I

    move-result v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextDescentTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->fontMetricsTab:[Landroid/graphics/Paint$FontMetricsInt;

    aget-object v1, v1, p2

    iget v1, v1, Landroid/graphics/Paint$FontMetricsInt;->descent:I

    invoke-static {v1}, Ljava/lang/Math;->abs(I)I

    move-result v1

    aput v1, v0, p2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v1, v1, p2

    sget-object v2, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthChars:[C

    const/4 v3, 0x0

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->getMaxLabelChars()I

    move-result v4

    invoke-virtual {v1, v2, v3, v4}, Landroid/graphics/Paint;->measureText([CII)F

    move-result v1

    float-to-int v1, v1

    aput v1, v0, p2

    return-void
.end method

.method private initAxisTextAlignment(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->namePaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    if-eqz p2, :cond_0

    const/4 v0, 0x3

    if-ne v0, p2, :cond_2

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    const/4 v0, 0x1

    if-ne v0, p2, :cond_4

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    goto :goto_0

    :cond_3
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->RIGHT:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    goto :goto_0

    :cond_4
    const/4 v0, 0x2

    if-ne v0, p2, :cond_1

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v0

    if-eqz v0, :cond_5

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->RIGHT:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    goto :goto_0

    :cond_5
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelPaintTab:[Landroid/graphics/Paint;

    aget-object v0, v0, p2

    sget-object v1, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    goto :goto_0
.end method

.method private insetContentRectWithAxesMargins(II)V
    .locals 2

    const/4 v1, 0x0

    const/4 v0, 0x1

    if-ne v0, p2, :cond_1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    invoke-virtual {v0, p1, v1, v1, v1}, Llecho/lib/hellocharts/computator/ChartComputator;->insetContentRect(IIII)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    const/4 v0, 0x2

    if-ne v0, p2, :cond_2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    invoke-virtual {v0, v1, v1, p1, v1}, Llecho/lib/hellocharts/computator/ChartComputator;->insetContentRect(IIII)V

    goto :goto_0

    :cond_2
    if-nez p2, :cond_3

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    invoke-virtual {v0, v1, p1, v1, v1}, Llecho/lib/hellocharts/computator/ChartComputator;->insetContentRect(IIII)V

    goto :goto_0

    :cond_3
    const/4 v0, 0x3

    if-ne v0, p2, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    invoke-virtual {v0, v1, v1, v1, p1}, Llecho/lib/hellocharts/computator/ChartComputator;->insetContentRect(IIII)V

    goto :goto_0
.end method

.method private intiTiltedLabelsTranslation(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 12

    const/4 v10, 0x3

    const/4 v9, 0x2

    const/4 v8, 0x1

    const/4 v0, 0x0

    const-wide/high16 v6, 0x4000000000000000L    # 2.0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelWidthTab:[I

    aget v1, v1, p2

    int-to-double v2, v1

    invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v2

    div-double/2addr v2, v6

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    double-to-int v2, v2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v1, v1, p2

    int-to-double v4, v1

    invoke-static {v4, v5, v6, v7}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v4

    div-double/2addr v4, v6

    invoke-static {v4, v5}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v4

    double-to-int v1, v4

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v3

    if-eqz v3, :cond_4

    if-ne v8, p2, :cond_1

    :cond_0
    :goto_0
    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelXTranslation:[I

    aput v1, v2, p2

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->tiltedLabelYTranslation:[I

    aput v0, v1, p2

    return-void

    :cond_1
    if-ne v9, p2, :cond_2

    neg-int v1, v2

    div-int/lit8 v1, v1, 0x2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_2
    if-nez p2, :cond_3

    div-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_3
    if-ne v10, p2, :cond_7

    neg-int v1, v2

    div-int/lit8 v1, v1, 0x2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_4
    if-ne v8, p2, :cond_5

    neg-int v1, v2

    div-int/lit8 v1, v1, 0x2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_5
    if-eq v9, p2, :cond_0

    if-nez p2, :cond_6

    neg-int v1, v2

    div-int/lit8 v1, v1, 0x2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_6
    if-ne v10, p2, :cond_7

    div-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelTextAscentTab:[I

    aget v2, v2, p2

    sub-int/2addr v1, v2

    move v11, v1

    move v1, v0

    move v0, v11

    goto :goto_0

    :cond_7
    move v1, v0

    goto :goto_0
.end method

.method private isAxisVertical(I)Z
    .locals 3

    const/4 v0, 0x1

    if-eq v0, p1, :cond_0

    const/4 v1, 0x2

    if-ne v1, p1, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    if-eqz p1, :cond_2

    const/4 v0, 0x3

    if-ne v0, p1, :cond_3

    :cond_2
    const/4 v0, 0x0

    goto :goto_0

    :cond_3
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "Invalid axis position "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method private onChartDataOrSizeChanged()V
    .locals 2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXTop()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    const/4 v1, 0x0

    invoke-direct {p0, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxis(Llecho/lib/hellocharts/model/Axis;I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXBottom()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    const/4 v1, 0x3

    invoke-direct {p0, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxis(Llecho/lib/hellocharts/model/Axis;I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYLeft()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    const/4 v1, 0x1

    invoke-direct {p0, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxis(Llecho/lib/hellocharts/model/Axis;I)V

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYRight()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    const/4 v1, 0x2

    invoke-direct {p0, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->initAxis(Llecho/lib/hellocharts/model/Axis;I)V

    return-void
.end method

.method private prepareAutoGeneratedAxis(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 8

    const/4 v4, 0x0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0}, Llecho/lib/hellocharts/computator/ChartComputator;->getVisibleViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    iget-object v1, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    invoke-direct {p0, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->isAxisVertical(I)Z

    move-result v5

    if-eqz v5, :cond_3

    iget v3, v0, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    iget v2, v0, Llecho/lib/hellocharts/model/Viewport;->top:F

    invoke-virtual {v1}, Landroid/graphics/Rect;->height()I

    move-result v0

    :goto_0
    invoke-static {v0}, Ljava/lang/Math;->abs(I)I

    move-result v0

    iget-object v6, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    aget v6, v6, p2

    div-int/2addr v0, v6

    div-int/lit8 v0, v0, 0x2

    iget-object v6, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v6, v6, p2

    invoke-static {v3, v2, v0, v6}, Llecho/lib/hellocharts/util/FloatUtils;->computeAutoGeneratedAxisValues(FFILlecho/lib/hellocharts/util/AxisAutoValues;)V

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->hasLines()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v0, v0, p2

    array-length v0, v0

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    mul-int/lit8 v2, v2, 0x4

    if-ge v0, v2, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    mul-int/lit8 v2, v2, 0x4

    new-array v2, v2, [F

    aput-object v2, v0, p2

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v0, v0, p2

    array-length v0, v0

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    if-ge v0, v2, :cond_1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    new-array v2, v2, [F

    aput-object v2, v0, p2

    :cond_1
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesToDrawTab:[[F

    aget-object v0, v0, p2

    array-length v0, v0

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    if-ge v0, v2, :cond_2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesToDrawTab:[[F

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    new-array v2, v2, [F

    aput-object v2, v0, p2

    :cond_2
    move v6, v4

    move v7, v4

    :goto_1
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v0, v0, p2

    iget v0, v0, Llecho/lib/hellocharts/util/AxisAutoValues;->valuesNumber:I

    if-ge v6, v0, :cond_5

    if-eqz v5, :cond_4

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget-object v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->values:[F

    aget v2, v2, v6

    invoke-virtual {v0, v2}, Llecho/lib/hellocharts/computator/ChartComputator;->computeRawY(F)F

    move-result v2

    :goto_2
    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v3

    move-object v0, p0

    move v4, p2

    invoke-direct/range {v0 .. v5}, Llecho/lib/hellocharts/renderer/AxesRenderer;->checkRawValue(Landroid/graphics/Rect;FZIZ)Z

    move-result v0

    if-eqz v0, :cond_6

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v0, v0, p2

    aput v2, v0, v7

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesToDrawTab:[[F

    aget-object v0, v0, p2

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget-object v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->values:[F

    aget v2, v2, v6

    aput v2, v0, v7

    add-int/lit8 v4, v7, 0x1

    :goto_3
    add-int/lit8 v0, v6, 0x1

    move v6, v0

    move v7, v4

    goto :goto_1

    :cond_3
    iget v3, v0, Llecho/lib/hellocharts/model/Viewport;->left:F

    iget v2, v0, Llecho/lib/hellocharts/model/Viewport;->right:F

    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v0

    goto/16 :goto_0

    :cond_4
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    iget-object v2, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->autoValuesBufferTab:[Llecho/lib/hellocharts/util/AxisAutoValues;

    aget-object v2, v2, p2

    iget-object v2, v2, Llecho/lib/hellocharts/util/AxisAutoValues;->values:[F

    aget v2, v2, v6

    invoke-virtual {v0, v2}, Llecho/lib/hellocharts/computator/ChartComputator;->computeRawX(F)F

    move-result v2

    goto :goto_2

    :cond_5
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawNumTab:[I

    aput v7, v0, p2

    return-void

    :cond_6
    move v4, v7

    goto :goto_3
.end method

.method private prepareAxisToDraw(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 1

    invoke-virtual {p1}, Llecho/lib/hellocharts/model/Axis;->isAutoGenerated()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareAutoGeneratedAxis(Llecho/lib/hellocharts/model/Axis;I)V

    :goto_0
    return-void

    :cond_0
    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareCustomAxis(Llecho/lib/hellocharts/model/Axis;I)V

    goto :goto_0
.end method

.method private prepareCustomAxis(Llecho/lib/hellocharts/model/Axis;I)V
    .locals 16

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v2}, Llecho/lib/hellocharts/computator/ChartComputator;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v4

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v2}, Llecho/lib/hellocharts/computator/ChartComputator;->getVisibleViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v6

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v2}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v3

    move-object/from16 v0, p0

    move/from16 v1, p2

    invoke-direct {v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->isAxisVertical(I)Z

    move-result v7

    const/high16 v2, 0x3f800000    # 1.0f

    if-eqz v7, :cond_6

    invoke-virtual {v4}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v5

    const/4 v8, 0x0

    cmpl-float v5, v5, v8

    if-lez v5, :cond_0

    invoke-virtual {v6}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v5

    const/4 v8, 0x0

    cmpl-float v5, v5, v8

    if-lez v5, :cond_0

    invoke-virtual {v3}, Landroid/graphics/Rect;->height()I

    move-result v2

    int-to-float v2, v2

    invoke-virtual {v4}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v4

    invoke-virtual {v6}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v5

    div-float/2addr v4, v5

    mul-float/2addr v2, v4

    :cond_0
    iget v5, v6, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    iget v4, v6, Llecho/lib/hellocharts/model/Viewport;->top:F

    move v11, v4

    move v12, v5

    :goto_0
    const/4 v4, 0x0

    cmpl-float v4, v2, v4

    if-nez v4, :cond_1

    const/high16 v2, 0x3f800000    # 1.0f

    :cond_1
    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v6

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v6

    move-object/from16 v0, p0

    iget-object v8, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->labelDimensionForStepsTab:[I

    aget v8, v8, p2

    mul-int/2addr v6, v8

    int-to-double v8, v6

    const-wide/high16 v14, 0x3ff8000000000000L    # 1.5

    mul-double/2addr v8, v14

    float-to-double v14, v2

    div-double/2addr v8, v14

    invoke-static {v8, v9}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v8

    invoke-static {v4, v5, v8, v9}, Ljava/lang/Math;->max(DD)D

    move-result-wide v4

    double-to-int v13, v4

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->hasLines()Z

    move-result v2

    if-eqz v2, :cond_2

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    aget-object v2, v2, p2

    array-length v2, v2

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    mul-int/lit8 v4, v4, 0x4

    if-ge v2, v4, :cond_2

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->linesDrawBufferTab:[[F

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    mul-int/lit8 v4, v4, 0x4

    new-array v4, v4, [F

    aput-object v4, v2, p2

    :cond_2
    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v2, v2, p2

    array-length v2, v2

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    if-ge v2, v4, :cond_3

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    new-array v4, v4, [F

    aput-object v4, v2, p2

    :cond_3
    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;

    aget-object v2, v2, p2

    array-length v2, v2

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    if-ge v2, v4, :cond_4

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    new-array v4, v4, [Llecho/lib/hellocharts/model/AxisValue;

    aput-object v4, v2, p2

    :cond_4
    const/4 v4, 0x0

    const/4 v2, 0x0

    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->getValues()Ljava/util/List;

    move-result-object v5

    invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v14

    move v9, v2

    move v10, v4

    :goto_1
    invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_9

    invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    move-object v8, v2

    check-cast v8, Llecho/lib/hellocharts/model/AxisValue;

    invoke-virtual {v8}, Llecho/lib/hellocharts/model/AxisValue;->getValue()F

    move-result v2

    cmpl-float v4, v2, v12

    if-ltz v4, :cond_a

    cmpg-float v4, v2, v11

    if-gtz v4, :cond_a

    rem-int v4, v10, v13

    if-nez v4, :cond_5

    if-eqz v7, :cond_8

    move-object/from16 v0, p0

    iget-object v4, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v4, v2}, Llecho/lib/hellocharts/computator/ChartComputator;->computeRawY(F)F

    move-result v4

    :goto_2
    invoke-virtual/range {p1 .. p1}, Llecho/lib/hellocharts/model/Axis;->isInside()Z

    move-result v5

    move-object/from16 v2, p0

    move/from16 v6, p2

    invoke-direct/range {v2 .. v7}, Llecho/lib/hellocharts/renderer/AxesRenderer;->checkRawValue(Landroid/graphics/Rect;FZIZ)Z

    move-result v2

    if-eqz v2, :cond_5

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->rawValuesTab:[[F

    aget-object v2, v2, p2

    aput v4, v2, v9

    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawTab:[[Llecho/lib/hellocharts/model/AxisValue;

    aget-object v2, v2, p2

    aput-object v8, v2, v9

    add-int/lit8 v9, v9, 0x1

    :cond_5
    add-int/lit8 v10, v10, 0x1

    move v2, v9

    move v4, v10

    :goto_3
    move v9, v2

    move v10, v4

    goto :goto_1

    :cond_6
    invoke-virtual {v4}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v5

    const/4 v8, 0x0

    cmpl-float v5, v5, v8

    if-lez v5, :cond_7

    invoke-virtual {v6}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v5

    const/4 v8, 0x0

    cmpl-float v5, v5, v8

    if-lez v5, :cond_7

    invoke-virtual {v3}, Landroid/graphics/Rect;->width()I

    move-result v2

    int-to-float v2, v2

    invoke-virtual {v4}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v4

    invoke-virtual {v6}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v5

    div-float/2addr v4, v5

    mul-float/2addr v2, v4

    :cond_7
    iget v5, v6, Llecho/lib/hellocharts/model/Viewport;->left:F

    iget v4, v6, Llecho/lib/hellocharts/model/Viewport;->right:F

    move v11, v4

    move v12, v5

    goto/16 :goto_0

    :cond_8
    move-object/from16 v0, p0

    iget-object v4, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v4, v2}, Llecho/lib/hellocharts/computator/ChartComputator;->computeRawX(F)F

    move-result v4

    goto :goto_2

    :cond_9
    move-object/from16 v0, p0

    iget-object v2, v0, Llecho/lib/hellocharts/renderer/AxesRenderer;->valuesToDrawNumTab:[I

    aput v9, v2, p2

    return-void

    :cond_a
    move v2, v9

    move v4, v10

    goto :goto_3
.end method


# virtual methods
.method public drawInBackground(Landroid/graphics/Canvas;)V
    .locals 5

    const/4 v4, 0x3

    const/4 v3, 0x2

    const/4 v2, 0x1

    const/4 v1, 0x0

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYLeft()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-direct {p0, v0, v2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareAxisToDraw(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, v0, v2}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLines(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYRight()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_1

    invoke-direct {p0, v0, v3}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareAxisToDraw(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, v0, v3}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLines(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_1
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXBottom()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_2

    invoke-direct {p0, v0, v4}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareAxisToDraw(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, v0, v4}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLines(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_2
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXTop()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_3

    invoke-direct {p0, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->prepareAxisToDraw(Llecho/lib/hellocharts/model/Axis;I)V

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLines(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_3
    return-void
.end method

.method public drawInForeground(Landroid/graphics/Canvas;)V
    .locals 2

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYLeft()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v1, 0x1

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLabelsAndName(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_0
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisYRight()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_1

    const/4 v1, 0x2

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLabelsAndName(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_1
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXBottom()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_2

    const/4 v1, 0x3

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLabelsAndName(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_2
    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->getAxisXTop()Llecho/lib/hellocharts/model/Axis;

    move-result-object v0

    if-eqz v0, :cond_3

    const/4 v1, 0x0

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawAxisLabelsAndName(Landroid/graphics/Canvas;Llecho/lib/hellocharts/model/Axis;I)V

    :cond_3
    return-void
.end method

.method public onChartDataChanged()V
    .locals 0

    invoke-direct {p0}, Llecho/lib/hellocharts/renderer/AxesRenderer;->onChartDataOrSizeChanged()V

    return-void
.end method

.method public onChartSizeChanged()V
    .locals 0

    invoke-direct {p0}, Llecho/lib/hellocharts/renderer/AxesRenderer;->onChartDataOrSizeChanged()V

    return-void
.end method

.method public resetRenderer()V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->chart:Llecho/lib/hellocharts/view/Chart;

    invoke-interface {v0}, Llecho/lib/hellocharts/view/Chart;->getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;

    move-result-object v0

    iput-object v0, p0, Llecho/lib/hellocharts/renderer/AxesRenderer;->computator:Llecho/lib/hellocharts/computator/ChartComputator;

    return-void
.end method
